const fs = require("fs");

const { getFileSuffix , uploadQiNiu } = require('../../util/index');

const qiniuUpload = async inputFiles => {
    return Promise.all(inputFiles.map(({ path , originalFilename }) => {
        const suffix = getFileSuffix (originalFilename);
        return uploadQiNiu(suffix,path);
    }));
};

exports.qiniuUpload = qiniuUpload;